package org.graduates.webapp.actions.course;

import org.graduates.webapp.actions.BaseAction;
import org.projects.graduates.domain.Teaching;

import com.opensymphony.xwork2.ActionSupport;

public class CourseInfoAction extends BaseAction {
	private static final long serialVersionUID = -8585958080303968183L;

	private long cid = 0L;

	private Teaching teaching;

	public String execute() {
		if (0L == cid) {
			return ActionSupport.INPUT;
		}

		teaching = Teaching.get(Teaching.class, cid);

		if (null == teaching) {
			return ActionSupport.INPUT;
		}

		return ActionSupport.SUCCESS;
	}

	
	public long getCid() {
		return cid;
	}


	public void setCid(long cid) {
		this.cid = cid;
	}


	public Teaching getTeaching() {
		return teaching;
	}

	public void setTeaching(Teaching teaching) {
		this.teaching = teaching;
	}

}
